//
//  KDDPosition.h
//  MengLiao
//
//  Created by xiuxin on 2022/7/15.
//  Copyright © 2022 ZHBen. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "KDDHeader.h"

@interface KDDPosition : NSObject <NSCopying>

@property (nonatomic) KDDViewType viewType;

@property (nonatomic) NSInteger section;

@property (nonatomic) NSInteger index;

@property (strong,nonatomic) NSIndexPath * indexPath;

@property (strong,nonatomic) __kindof NSObject * model;

+ (KDDPosition *)cellPosition:(NSIndexPath *)indexPath;

+ (KDDPosition *)cellPositionWithSection:(NSInteger)section index:(NSInteger)index;

+ (KDDPosition *)headerPosition:(NSInteger)section;

+ (KDDPosition *)footerPosition:(NSInteger)section;

+ (KDDPosition *)positionWithViewType:(KDDViewType)viewType indexPath:(NSIndexPath *)indexPath;

+ (NSArray<KDDPosition *> *)cellPositionList:(NSIndexSet *)indexSet section:(NSInteger)section;

+ (NSArray<KDDPosition *> *)sortedPositionList:(NSArray<KDDPosition *> *)positionList;

- (NSComparisonResult)compare:(KDDPosition *)object;

@end
